//Type here your validation function
//Use elemValue as a value of your validated element
//    neededValue as a value to compare with elemValue
//Function must returns true if validation is not successful
//                      false otherwise
function minLength() {
    if (typeof(neededValue) == "undefined") {
        return true;
    };
    if (elemValue.length < neededValue.toFixed()) {
        return true;
    } else {
        return false;
    };
};

function getErrorMessage() {
    //Type here default error message for this validator. It's could be replaced
    //by validation options for every used element.
    //You can use %value% to place a current value of validated element
    var messages = {"en" : "Not enought characters are applied!",
                    "ru" : "Не достаточно символов"};
    messages = $.extend(messages, messagesCur);

    return messages[locale];
};